from rest_framework.serializers import ModelSerializer

from app_path.models import Path, User_Path, Stage
from course.models import Course


class CourseSer(ModelSerializer):
    class Meta:
        model = Course
        fields = "__all__"


class StageSer(ModelSerializer):
    course_set = CourseSer(many=True)

    class Meta:
        model = Stage
        fields = "__all__"


class PathSer(ModelSerializer):
    stage_set = StageSer(many=True)

    class Meta:
        model = Path
        fields = "__all__"


class User_PathSer(ModelSerializer):
    class Meta:
        model = User_Path
        fields = "__all__"
